<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <ControlTemplate x:Key="ScrollViewerControlTemplate" TargetType="{x:Type ScrollViewer}">
        <Grid x:Name="Grid" Background="Transparent">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <Rectangle x:Name="Corner" Grid.Column="1" Fill="Transparent" Grid.Row="1" />
            <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" Grid.Column="0" Grid.Row="0" Margin="{TemplateBinding Padding}"
                                    Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" 
                                    CanContentScroll="{TemplateBinding CanContentScroll}" CanHorizontallyScroll="False" CanVerticallyScroll="False" />
            <ScrollBar x:Name="PART_VerticalScrollBar" Grid.Column="1" Grid.Row="0" Cursor="Arrow" Orientation="Vertical"
                       Maximum="{TemplateBinding ScrollableHeight}" Minimum="0" 
                       Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" 
                       Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" 
                       AutomationProperties.AutomationId="VerticalScrollBar" 
                       ViewportSize="{TemplateBinding ViewportHeight}" />
            <ScrollBar x:Name="PART_HorizontalScrollBar" Cursor="Arrow" Grid.Column="0" Grid.Row="1" Orientation="Horizontal" 
                       Maximum="{TemplateBinding ScrollableWidth}" Minimum="0" 
                       Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" 
                       Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" 
                       AutomationProperties.AutomationId="HorizontalScrollBar" 
                       ViewportSize="{TemplateBinding ViewportWidth}" />
        </Grid>
    </ControlTemplate>
    <Style TargetType="{x:Type ScrollViewer}" BasedOn="{StaticResource {x:Type ScrollViewer}}">
        <Setter Property="Template" Value="{StaticResource ScrollViewerControlTemplate}" />
    </Style>
</ResourceDictionary>
